package com.scu.baseline.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@Slf4j
@RestController
public class TestLogController {
    // 自定义当前类日志
    private static final Logger sysLog = LoggerFactory.getLogger(TestLogController.class);

    @RequestMapping("/checkLog")
    public void check(String username) {
        sysLog.debug("sys debug");
        sysLog.info("sys info username=" + username);
        sysLog.warn("sys warn");

        try {
            Integer.parseInt("s");
        } catch (Exception e) {
            sysLog.error("sys error   " + e.toString());
        }
    }
}